<template>
    <div class="desc-container">
        <!-- 图文介绍头部 -->
        <h1>{{ goodsDesc.title }}</h1>
        <!-- 图文介绍主题部分 -->
        <div class="desc-content" v-html="goodsDesc.content">

        </div>
    </div>
</template>
<script>
import { Toast } from 'mint-ui';
export default {
    data(){
        return {
            goodsDesc:[],
            id: this.$route.params.id
        }
    },
    created(){
        this.getgoodsDescList()
    },
    methods:{
       getgoodsDescList(){
          this.$http.get("api/goods/getdesc/"+this.id).then( result =>{
                if( result.body.status === 0 ){
                    this.goodsDesc = result.body.message[0]
                } else {
                   Toast('加载失败');
                }
            })
      }  
    }  
}
</script>
<style lang="scss">
    .desc-container {
        h1 {
            font-size: 16px;
            text-align: center;
            color: #229dd6;
            font-weight: 700;
            padding: 15px 0px;
            border-bottom: 1px solid #ccc;
        }
        .desc-content {
            padding: 20px 10px;
            img {
                width: 100%;
            }
        }
    }
</style>


